import unittest
from selenium import webdriver
from searchpage import SearchOne

class BaiBu(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.driver = webdriver.Chrome()
        cls.driver.implicitly_wait(10)
        print("hello1")
    def test001(self):
        url="http://www.baidu.com"
        s = SearchOne(self.driver,url)
        s.open_baidu()
        s.input_search_content("123")
        s.click_baidu_search()
        s.click_open_hao()
        self.driver.switch_to.window(self.driver.window_handles[1])
        print("hello2")
    @classmethod
    def tearDownClass(cls):
    #      self.driver.quit()
        print("hello3")
        pass
if __name__ == '__main__':
    unittest.main()